! function (t) {
    var e = {};

    function n(r) {
        if (e[r]) return e[r].exports;
        var o = e[r] = {
            i: r,
            l: !1,
            exports: {}
        };
        return t[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports
    }
    n.m = t, n.c = e, n.d = function (t, e, r) {
        n.o(t, e) || Object.defineProperty(t, e, {
            enumerable: !0,
            get: r
        })
    }, n.r = function (t) {
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
            value: "Module"
        }), Object.defineProperty(t, "__esModule", {
            value: !0
        })
    }, n.t = function (t, e) {
        if (1 & e && (t = n(t)), 8 & e) return t;
        if (4 & e && "object" == typeof t && t && t.__esModule) return t;
        var r = Object.create(null);
        if (n.r(r), Object.defineProperty(r, "default", {
                enumerable: !0,
                value: t
            }), 2 & e && "string" != typeof t)
            for (var o in t) n.d(r, o, function (e) {
                return t[e]
            }.bind(null, o));
        return r
    }, n.n = function (t) {
        var e = t && t.__esModule ? function () {
            return t.default
        } : function () {
            return t
        };
        return n.d(e, "a", e), e
    }, n.o = function (t, e) {
        return Object.prototype.hasOwnProperty.call(t, e)
    }, n.p = ".", n(n.s = 11)
}([function (t, e) {
    t.exports = function (t) {
        return t && t.__esModule ? t : {
            default: t
        }
    }
}, function (t, e, n) {
    "use strict";
    var r = n(0)(n(0));
    Object.defineProperty(e, "__esModule", {
        value: !0
    }), e.decipher = e.cipher = e.fetch_retry = e.fetchWithTimeout = void 0;
    var o = n(2),
        a = (0, r.default)(o);

    function i(t, e) {
        var n = Object.keys(t);
        if (Object.getOwnPropertySymbols) {
            var r = Object.getOwnPropertySymbols(t);
            e && (r = r.filter((function (e) {
                return Object.getOwnPropertyDescriptor(t, e).enumerable
            }))), n.push.apply(n, r)
        }
        return n
    }

    function c(t) {
        for (var e = 1; e < arguments.length; e++) {
            var n = null != arguments[e] ? arguments[e] : {};
            e % 2 ? i(Object(n), !0).forEach((function (e) {
                (0, a.default)(t, e, n[e])
            })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : i(Object(n)).forEach((function (e) {
                Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e))
            }))
        }
        return t
    }
    var s = e.fetchWithTimeout = function (t) {
        var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
            n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 5e3,
            r = new AbortController,
            o = c({}, e, {
                signal: r.signal
            });
        setTimeout((function () {
            r.abort()
        }), n);
        return fetch(t, o).then((function (t) {
            if (!t.ok) throw new Error("".concat(t.status, ": ").concat(t.statusText));
            return t
        })).catch((function (t) {
            if ("AbortError" === t.name) throw new Error("Response timed out");
            throw new Error(t.message)
        }))
    };
    e.fetch_retry = function t(e, n, r) {
        var o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1;
        return s(e, n, r).catch((function (a) {
            if (1 === o) throw a;
            return t(e, n, r, o - 1)
        }))
    }, e.cipher = function (t) {
        var e = function (t) {
                return t.split("").map((function (t) {
                    return t.charCodeAt(0)
                }))
            },
            n = function (t) {
                return ("0" + Number(t).toString(16)).substr(-2)
            },
            r = function (n) {
                return e(t).reduce((function (t, e) {
                    return t ^ e
                }), n)
            };
        return function (t) {
            return t.split("").map(e).map(r).map(n).join("")
        }
    }, e.decipher = function (t) {
        var e = function (e) {
            return (n = t, n.split("").map((function (t) {
                return t.charCodeAt(0)
            }))).reduce((function (t, e) {
                return t ^ e
            }), e);
            var n
        };
        return function (t) {
            return t.match(/.{1,2}/g).map((function (t) {
                return parseInt(t, 16)
            })).map(e).map((function (t) {
                return String.fromCharCode(t)
            })).join("")
        }
    }
}, function (t, e) {
    t.exports = function (t, e, n) {
        return e in t ? Object.defineProperty(t, e, {
            value: n,
            enumerable: !0,
            configurable: !0,
            writable: !0
        }) : t[e] = n, t
    }
}, function (t, e, n) {
    "use strict";
    Object.defineProperty(e, "__esModule", {
        value: !0
    }), e.DISABLE_DOWNLOADING_FROM_YOUTUBE_REGEXP = e.supportedLanguages = e.t = e.PRE_DEF_EXTS = e.YTDLPAGE = e.HOMEPAGE = e.ISEDGE = e.PROENV = void 0, e.doInit = function () {
        if (void 0 === localStorage[i] || "" == localStorage[i]) {
            var t = new Array({
                ext: "flv",
                size: 10
            }, {
                ext: "hlv",
                size: 10
            }, {
                ext: "f4v",
                size: 10
            }, {
                ext: "mp4",
                size: 10
            }, {
                ext: "mp3",
                size: 10
            }, {
                ext: "wma",
                size: 10
            }, {
                ext: "wav",
                size: 10
            }, {
                ext: "m4a",
                size: 10
            }, {
                ext: "webm",
                size: 10
            }, {
                ext: "ogg",
                size: 10
            }, {
                ext: "ogv",
                size: 10
            }, {
                ext: "acc",
                size: 10
            }, {
                ext: "mov",
                size: 10
            }, {
                ext: "mkv",
                size: 10
            }, {
                ext: "m3u8",
                size: 0
            }, {
                ext: "ts",
                size: 1e11
            });
            localStorage[i] = JSON.stringify(t)
        }
        if (void 0 === localStorage.Type) {
            var e = new Array({
                Type: "video/*",
                size: 2048
            }, {
                Type: "audio/*",
                size: 10
            });
            localStorage.Type = JSON.stringify(e)
        }
        if (void 0 === localStorage.BlockedDomains) {
            var n = new Array;
            localStorage.BlockedDomains = JSON.stringify(n)
        }
        void 0 === localStorage.repeat && (localStorage.repeat = !1);
        void 0 === localStorage.repeatReg && (localStorage.repeatReg = "\\?[\\S]+");
        void 0 === localStorage.Debug && (localStorage.Debug = !1);
        void 0 === localStorage.TitleName && (localStorage.TitleName = !1);
        void 0 === localStorage.popListCount && (localStorage.popListCount = 30);
        void 0 === localStorage.showCountOnIcon && (localStorage.showCountOnIcon = !0)
    }, e.tr = function (t) {
        $("#" + t).html(c(t))
    }, e.getLanguage = l, e.getExtManifest = function () {
        return o.runtime.getManifest()
    }, e.isActivePro = p, e.getLoaderUrl = function () {
        var t, e, n = l(),
            r = "://www.cnbbx.com/";
        t = "other" != n ? "hls.html" : "ohls.html";
        p() && (r = "://www.cnbbx.com/", t = "hls.vhtml", "other" == n && (t = "ohls.vhtml"));
        e = a ? r + (s.includes(n) ? n + "/" : "") + t : "://127.0.0.1/" + t;
        return e
    }, e.getDLMUrl = function () {
        var t, e, n = l(),
            r = "://www.cnbbx.com/";
        t = "other" != n ? "dlm.html" : "odlm.html";
        p() && (r = "://www.cnbbx.com/", t = "dlm.vhtml", "other" == n && (t = "odlm.vhtml"));
        e = a ? r + "dlm/" + (s.includes(n) ? n + "/" : "") + t : "://127.0.0.1/dlm/" + t;
        return e
    };
    var r = n(1),
        o = navigator.userAgent.includes("Chrome") ? chrome : browser,
        a = e.PROENV = !0;
    e.ISEDGE = !1, e.HOMEPAGE = void 0, e.YTDLPAGE = void 0;
    a ? (e.HOMEPAGE = "https://www.cnbbx.com", e.YTDLPAGE = "https://www.cnbbx.com/yt/") : (console.log("dev env"), e.HOMEPAGE = "http://127.0.0.1", e.YTDLPAGE = "http://127.0.0.1");
    var i = e.PRE_DEF_EXTS = "Ext04";
    o.browserAction.setIcon({
        path: {
            16: "assets/icons/16x16_gray.png",
            32: "assets/icons/32x32_gray.png",
            48: "assets/icons/48x48_gray.png",
            64: "assets/icons/64x64_gray.png",
            128: "assets/icons/128x128_gray.png"
        }
    });
    var c = e.t = o.i18n.getMessage;
    var s = e.supportedLanguages = ["zh_tw", "zh_cn"];

    function l() {
        var t = o.i18n.getUILanguage();
        return t.match(/zh-CN/) ? "zh_cn" : t.match(/zh-TW/) ? "zh_tw" : t.startsWith("zh") ? "zh_cn" : t.startsWith("en") ? t.substr(0, 2) : "other"
    }
    if (o.runtime.onInstalled.addListener((function (t) {
            var e = l(),
                n = "https://www.cnbbx.com/" + (s.includes(e) ? e + "/" : "") + "installed.html";
            localStorage.getItem("installed") || o.tabs.create({
                url: n
            }, (function (t) {
                console.log("Hi, wellcome:)"), localStorage.setItem("installed", "t")
            }))
        })), o.runtime.setUninstallURL) {
        var u = l(),
            f = "https://www.cnbbx.com/" + (s.includes(u) ? u + "/" : "") + "uninstalled.html";
        o.runtime.setUninstallURL(f)
    }
    e.DISABLE_DOWNLOADING_FROM_YOUTUBE_REGEXP = /^https?:\/\/www\.youtube\.com\//;

    function p() {
        return 1
    }
}, function (t, e, n) {
    t.exports = n(7)
}, function (t, e) {
    function n(t, e, n, r, o, a, i) {
        try {
            var c = t[a](i),
                s = c.value
        } catch (t) {
            return void n(t)
        }
        c.done ? e(s) : Promise.resolve(s).then(r, o)
    }
    t.exports = function (t) {
        return function () {
            var e = this,
                r = arguments;
            return new Promise((function (o, a) {
                var i = t.apply(e, r);

                function c(t) {
                    n(i, o, a, c, s, "next", t)
                }

                function s(t) {
                    n(i, o, a, c, s, "throw", t)
                }
                c(void 0)
            }))
        }
    }
}, function (t, e, n) {
    "use strict";
    var r = n(0)(n(0));
    Object.defineProperty(e, "__esModule", {
        value: !0
    }), e.setBgOptions = e.getBgOptions = e.tellBGbroadcastMsgFromPipe = e.setUserInfo = e.keepSetHeader = e.unsetHeader = e.setHeader = e.fetchTheDom = e.EVENTS = void 0;
    var o, a, i, c, s, l, u, f, p = n(4),
        d = (0, r.default)(p),
        h = n(5),
        m = (0, r.default)(h);
    e.fetchTheDom = (o = (0, m.default)(d.default.mark((function t(e) {
        var n;
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    return t.next = 2, y(v.FETCH_DOM, e);
                case 2:
                    return n = t.sent, t.abrupt("return", n);
                case 4:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function (t) {
        return o.apply(this, arguments)
    }), e.setHeader = (a = (0, m.default)(d.default.mark((function t(e) {
        var n;
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    return t.next = 2, y(v.SET_HEADER, e);
                case 2:
                    return n = t.sent, t.abrupt("return", n);
                case 4:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function (t) {
        return a.apply(this, arguments)
    }), e.unsetHeader = (i = (0, m.default)(d.default.mark((function t(e) {
        var n;
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    return t.next = 2, y(v.UNSET_HEADER, e);
                case 2:
                    return n = t.sent, t.abrupt("return", n);
                case 4:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function (t) {
        return i.apply(this, arguments)
    }), e.keepSetHeader = (c = (0, m.default)(d.default.mark((function t(e) {
        var n;
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    return t.next = 2, y(v.KEEP_SET_HEADER, e);
                case 2:
                    return n = t.sent, t.abrupt("return", n);
                case 4:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function (t) {
        return c.apply(this, arguments)
    }), e.setUserInfo = (s = (0, m.default)(d.default.mark((function t(e) {
        var n;
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    return t.next = 2, y(v.SET_USER_INFO, e);
                case 2:
                    return n = t.sent, t.abrupt("return", n);
                case 4:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function (t) {
        return s.apply(this, arguments)
    }), e.tellBGbroadcastMsgFromPipe = (l = (0, m.default)(d.default.mark((function t(e) {
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    y(v.MESSAGEPIPE, e);
                case 1:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function (t) {
        return l.apply(this, arguments)
    }), e.getBgOptions = (u = (0, m.default)(d.default.mark((function t() {
        var e;
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    return t.next = 2, y(v.GET_BG_OPTIONS);
                case 2:
                    return e = t.sent, t.abrupt("return", e);
                case 4:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function () {
        return u.apply(this, arguments)
    }), e.setBgOptions = (f = (0, m.default)(d.default.mark((function t(e) {
        return d.default.wrap((function (t) {
            for (;;) switch (t.prev = t.next) {
                case 0:
                    y(v.SET_BG_OPTIONS, e);
                case 1:
                case "end":
                    return t.stop()
            }
        }), t)
    }))), function (t) {
        return f.apply(this, arguments)
    });
    e.onMessage = function (t, e) {
        g.runtime.onMessage.addListener((function (n, r, o) {
            var a = n.eventName,
                i = n.data;
            return a === t && (e(i, o), !0)
        }))
    }, e.sendMessage = y;
    var g = navigator.userAgent.includes("Chrome") ? chrome : browser,
        v = e.EVENTS = {
            FETCH_DOM: "FETCH_DOM",
            SET_HEADER: "ADD_HEADER",
            UNSET_HEADER: "UNSET_HEADER",
            KEEP_SET_HEADER: "KEEP_SET_HEADER",
            BLOCK_ONE_DOMAIN: "BLOCK_ONE_DOMAIN",
            SET_SPEEDUP_REC: "SET_SPEEDUP_REC",
            SET_USER_INFO: "SET_USER_INFO",
            DLM_NEW_TASK: "DLM_NEW_TASK",
            ISAP: "IS_ACTIVE_MEMBER",
            MESSAGEPIPE: "MESSAGEPIPE",
            BROADCASTPIPEMESSAGE: "BROADCASTPIPEMESSAGE",
            GET_BG_OPTIONS: "GET_BG_OPTIONS",
            SET_BG_OPTIONS: "SET_BG_OPTIONS"
        };

    function y(t, e) {
        return new Promise((function (n) {
            g.runtime.sendMessage({
                eventName: t,
                data: e
            }, (function (t) {
                n(t)
            }))
        }))
    }
}, function (t, e, n) {
    var r = function (t) {
        "use strict";
        var e, n = Object.prototype,
            r = n.hasOwnProperty,
            o = "function" == typeof Symbol ? Symbol : {},
            a = o.iterator || "@@iterator",
            i = o.asyncIterator || "@@asyncIterator",
            c = o.toStringTag || "@@toStringTag";

        function s(t, e, n, r) {
            var o = e && e.prototype instanceof m ? e : m,
                a = Object.create(o.prototype),
                i = new $(r || []);
            return a._invoke = function (t, e, n) {
                var r = u;
                return function (o, a) {
                    if (r === p) throw new Error("Generator is already running");
                    if (r === d) {
                        if ("throw" === o) throw a;
                        return D()
                    }
                    for (n.method = o, n.arg = a;;) {
                        var i = n.delegate;
                        if (i) {
                            var c = b(i, n);
                            if (c) {
                                if (c === h) continue;
                                return c
                            }
                        }
                        if ("next" === n.method) n.sent = n._sent = n.arg;
                        else if ("throw" === n.method) {
                            if (r === u) throw r = d, n.arg;
                            n.dispatchException(n.arg)
                        } else "return" === n.method && n.abrupt("return", n.arg);
                        r = p;
                        var s = l(t, e, n);
                        if ("normal" === s.type) {
                            if (r = n.done ? d : f, s.arg === h) continue;
                            return {
                                value: s.arg,
                                done: n.done
                            }
                        }
                        "throw" === s.type && (r = d, n.method = "throw", n.arg = s.arg)
                    }
                }
            }(t, n, i), a
        }

        function l(t, e, n) {
            try {
                return {
                    type: "normal",
                    arg: t.call(e, n)
                }
            } catch (t) {
                return {
                    type: "throw",
                    arg: t
                }
            }
        }
        t.wrap = s;
        var u = "suspendedStart",
            f = "suspendedYield",
            p = "executing",
            d = "completed",
            h = {};

        function m() {}

        function g() {}

        function v() {}
        var y = {};
        y[a] = function () {
            return this
        };
        var E = Object.getPrototypeOf,
            w = E && E(E(P([])));
        w && w !== n && r.call(w, a) && (y = w);
        var S = v.prototype = m.prototype = Object.create(y);

        function _(t) {
            ["next", "throw", "return"].forEach((function (e) {
                t[e] = function (t) {
                    return this._invoke(e, t)
                }
            }))
        }

        function T(t) {
            var e;
            this._invoke = function (n, o) {
                function a() {
                    return new Promise((function (e, a) {
                        ! function e(n, o, a, i) {
                            var c = l(t[n], t, o);
                            if ("throw" !== c.type) {
                                var s = c.arg,
                                    u = s.value;
                                return u && "object" == typeof u && r.call(u, "__await") ? Promise.resolve(u.__await).then((function (t) {
                                    e("next", t, a, i)
                                }), (function (t) {
                                    e("throw", t, a, i)
                                })) : Promise.resolve(u).then((function (t) {
                                    s.value = t, a(s)
                                }), (function (t) {
                                    return e("throw", t, a, i)
                                }))
                            }
                            i(c.arg)
                        }(n, o, e, a)
                    }))
                }
                return e = e ? e.then(a, a) : a()
            }
        }

        function b(t, n) {
            var r = t.iterator[n.method];
            if (r === e) {
                if (n.delegate = null, "throw" === n.method) {
                    if (t.iterator.return && (n.method = "return", n.arg = e, b(t, n), "throw" === n.method)) return h;
                    n.method = "throw", n.arg = new TypeError("The iterator does not provide a 'throw' method")
                }
                return h
            }
            var o = l(r, t.iterator, n.arg);
            if ("throw" === o.type) return n.method = "throw", n.arg = o.arg, n.delegate = null, h;
            var a = o.arg;
            return a ? a.done ? (n[t.resultName] = a.value, n.next = t.nextLoc, "return" !== n.method && (n.method = "next", n.arg = e), n.delegate = null, h) : a : (n.method = "throw", n.arg = new TypeError("iterator result is not an object"), n.delegate = null, h)
        }

        function x(t) {
            var e = {
                tryLoc: t[0]
            };
            1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e)
        }

        function O(t) {
            var e = t.completion || {};
            e.type = "normal", delete e.arg, t.completion = e
        }

        function $(t) {
            this.tryEntries = [{
                tryLoc: "root"
            }], t.forEach(x, this), this.reset(!0)
        }

        function P(t) {
            if (t) {
                var n = t[a];
                if (n) return n.call(t);
                if ("function" == typeof t.next) return t;
                if (!isNaN(t.length)) {
                    var o = -1,
                        i = function n() {
                            for (; ++o < t.length;)
                                if (r.call(t, o)) return n.value = t[o], n.done = !1, n;
                            return n.value = e, n.done = !0, n
                        };
                    return i.next = i
                }
            }
            return {
                next: D
            }
        }

        function D() {
            return {
                value: e,
                done: !0
            }
        }
        return g.prototype = S.constructor = v, v.constructor = g, v[c] = g.displayName = "GeneratorFunction", t.isGeneratorFunction = function (t) {
            var e = "function" == typeof t && t.constructor;
            return !!e && (e === g || "GeneratorFunction" === (e.displayName || e.name))
        }, t.mark = function (t) {
            return Object.setPrototypeOf ? Object.setPrototypeOf(t, v) : (t.__proto__ = v, c in t || (t[c] = "GeneratorFunction")), t.prototype = Object.create(S), t
        }, t.awrap = function (t) {
            return {
                __await: t
            }
        }, _(T.prototype), T.prototype[i] = function () {
            return this
        }, t.AsyncIterator = T, t.async = function (e, n, r, o) {
            var a = new T(s(e, n, r, o));
            return t.isGeneratorFunction(n) ? a : a.next().then((function (t) {
                return t.done ? t.value : a.next()
            }))
        }, _(S), S[c] = "Generator", S[a] = function () {
            return this
        }, S.toString = function () {
            return "[object Generator]"
        }, t.keys = function (t) {
            var e = [];
            for (var n in t) e.push(n);
            return e.reverse(),
                function n() {
                    for (; e.length;) {
                        var r = e.pop();
                        if (r in t) return n.value = r, n.done = !1, n
                    }
                    return n.done = !0, n
                }
        }, t.values = P, $.prototype = {
            constructor: $,
            reset: function (t) {
                if (this.prev = 0, this.next = 0, this.sent = this._sent = e, this.done = !1, this.delegate = null, this.method = "next", this.arg = e, this.tryEntries.forEach(O), !t)
                    for (var n in this) "t" === n.charAt(0) && r.call(this, n) && !isNaN(+n.slice(1)) && (this[n] = e)
            },
            stop: function () {
                this.done = !0;
                var t = this.tryEntries[0].completion;
                if ("throw" === t.type) throw t.arg;
                return this.rval
            },
            dispatchException: function (t) {
                if (this.done) throw t;
                var n = this;

                function o(r, o) {
                    return c.type = "throw", c.arg = t, n.next = r, o && (n.method = "next", n.arg = e), !!o
                }
                for (var a = this.tryEntries.length - 1; a >= 0; --a) {
                    var i = this.tryEntries[a],
                        c = i.completion;
                    if ("root" === i.tryLoc) return o("end");
                    if (i.tryLoc <= this.prev) {
                        var s = r.call(i, "catchLoc"),
                            l = r.call(i, "finallyLoc");
                        if (s && l) {
                            if (this.prev < i.catchLoc) return o(i.catchLoc, !0);
                            if (this.prev < i.finallyLoc) return o(i.finallyLoc)
                        } else if (s) {
                            if (this.prev < i.catchLoc) return o(i.catchLoc, !0)
                        } else {
                            if (!l) throw new Error("try statement without catch or finally");
                            if (this.prev < i.finallyLoc) return o(i.finallyLoc)
                        }
                    }
                }
            },
            abrupt: function (t, e) {
                for (var n = this.tryEntries.length - 1; n >= 0; --n) {
                    var o = this.tryEntries[n];
                    if (o.tryLoc <= this.prev && r.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
                        var a = o;
                        break
                    }
                }
                a && ("break" === t || "continue" === t) && a.tryLoc <= e && e <= a.finallyLoc && (a = null);
                var i = a ? a.completion : {};
                return i.type = t, i.arg = e, a ? (this.method = "next", this.next = a.finallyLoc, h) : this.complete(i)
            },
            complete: function (t, e) {
                if ("throw" === t.type) throw t.arg;
                return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), h
            },
            finish: function (t) {
                for (var e = this.tryEntries.length - 1; e >= 0; --e) {
                    var n = this.tryEntries[e];
                    if (n.finallyLoc === t) return this.complete(n.completion, n.afterLoc), O(n), h
                }
            },
            catch: function (t) {
                for (var e = this.tryEntries.length - 1; e >= 0; --e) {
                    var n = this.tryEntries[e];
                    if (n.tryLoc === t) {
                        var r = n.completion;
                        if ("throw" === r.type) {
                            var o = r.arg;
                            O(n)
                        }
                        return o
                    }
                }
                throw new Error("illegal catch attempt")
            },
            delegateYield: function (t, n, r) {
                return this.delegate = {
                    iterator: P(t),
                    resultName: n,
                    nextLoc: r
                }, "next" === this.method && (this.arg = e), h
            }
        }, t
    }(t.exports);
    try {
        regeneratorRuntime = r
    } catch (t) {
        Function("r", "regeneratorRuntime = r")(r)
    }
}, , , , function (t, e, n) {
    "use strict";
    n(12);
    var r = n(3),
        o = n(6),
        a = navigator.userAgent.includes("Chrome") ? chrome : browser,
        i = (0, r.getLanguage)(),
        c = !navigator.userAgent.includes("Edge") && navigator.userAgent.includes("Firefox");
    ! function () {
        for (var t = 0, e = ["TpopNeedPlayit2", "TpopNeedPlayit", "TtryHlsLabel", "TtryHls", "TnoResource", "TdownSelected", "TcopySelected", "TselectAll", "TrevSelected"]; t < e.length; t++) {
            var n = e[t];
            (0, r.tr)(n)
        }
        $("#smallTryHlsBtn").attr("title", (0, r.t)("TtryHls")), $("#optionBtn").attr("title", (0, r.t)("TpopOptionBtn")), $("#questionBtn").attr("title", (0, r.t)("TpopQuestionBtn")), $("#homePageBtn").attr("title", (0, r.t)("TpopHomePageBtn")), $("#TtryHlsNotice").text((0, r.t)("TtryHls"))
    }(), $("#vNumber").text("version:" + (0, r.getExtManifest)().version), $("#tryHls").attr("title", (0, r.t)("TryHlsDesc") + " Keyboard shortcuts: Alt+Shift+D"), $("#tryHls").click((function () {
        a.runtime.sendMessage({
            cmd: "cmd_open_parser"
        }, (function (t) {
            t && $("#tempntc").html(t.msg).fadeIn(500).delay(1500).fadeOut(500)
        }))
    })), $("#smallTryHlsBtn").click((function () {
        a.runtime.sendMessage({
            cmd: "cmd_open_parser"
        }, (function (t) {
            t && $("#tempntc").html(t.msg).fadeIn(500).delay(1500).fadeOut(500)
        }))
    })), $("#optionBtn").click((function () {
        a.runtime.openOptionsPage()
    })), $("#questionBtn").attr("href", r.HOMEPAGE + "/" + (r.supportedLanguages.includes(i) ? i + "/" : "") + "feedback.html"), $("#homePageBtn").attr("href", r.HOMEPAGE + "/" + (r.supportedLanguages.includes(i) ? i + "/" : ""));
    var s, l, u = a.extension.getBackgroundPage();

    function f() {
        $("#medialist .vDownload").length >= 3 && ($("#down").show(), $(".DownCheck").show())
    }

    function p(t, e) {
        var n, i;
        null != t.name && "" != t.name || (t.name = t.title), n = "true" == localStorage.TitleName ? t.ext ? t.title + "." + t.ext : t.title : t.name;
        var s = t.name;
        i = s.length >= 40 ? (s = s.replace(/\.[^.\/]+$/, "")).substr(0, 13) + "..." + s.substr(-17) + "." + t.ext : s, "application/octet-stream" == t.type && (t.size = "[stream]");
        var u, f, p = "",
            d = "",
            h = '<span class="tag is-rounded">' + t.size + "</span>",
            m = '<a class="vDownload" title="' + (0, r.t)("Tdownload") + '"><span class="icon" style="color:#000"><i class="fas fa-download"></i></span></a>',
            g = '<td class="nameTd" title="' + i + '"><span>' + i + "</span></td>",
            v = '<input type="checkbox" class="DownCheck" checked="true"/>';
        (u = t.ext, ["ogg", "ogv", "mp4", "webm", "mp3", "wav", "flv", "m4a"].indexOf(u) > -1 && (d = '<a id="play" title="' + (0, r.t)("Tplay") + '"><span class="icon"><i class="fas fa-play"></i></a>'), "m3u8" == t.ext) && (p = '<a id="m3u8" title="' + (0, r.t)("Tm3u8") + '"><span class="icon"><i class="fas fa-file-video"></i></a>', m = '<a class="vDownload" title="' + (0, r.t)("Tdownload") + '"><span class="icon"><i class="fas fa-download"></i></span></a>', h = '<span class="tag is-rounded">' + (0, r.t)("TpopM3u8Des") + "</span>", t.title ? (f = t.title).length >= 29 && (f = f.substr(0, 15) + "..." + f.substr(-9)) : f = i, g = '<td class="nameTd" title="' + t.title + '"><span>' + f + "</span></td>", v = "");
        var y = "";
        localStorage.getItem("setDirectlySave") && (y = '<a class="dlmDownload" title="' + (0, r.t)("TdlmDownload") + '"><span class="icon"><i class="fas fa-cloud-download-alt"></i></span></a>');
        var E = '<tr class="file-row type-back">\n        <td class="checkbox-cell">'.concat(v, "</td>\n        ").concat(g, '\n        <td class="toolsTd">\n            ').concat(m, "\n            ").concat(d, '\n            <a id="copy" title="').concat((0, r.t)("Tcopy"), '"><span class="icon"><i class="fas fa-copy"></i></span></a>\n            ').concat(p, '\n            <a id="blockDomain" title="').concat((0, r.t)("TpopBlockDomain"), '"><span class="icon"><i class="fas fa-ban"></i></span></a>\n            ').concat(y, "\n        </td>\n        <td>").concat(h, '</td>\n    </tr>\n    <tr class="url" style="display:none">\n        <td colspan="4"><a href="').concat(t.url, '" target="_blank" download="').concat(n, '" id="media-').concat(t.mediaid, "-").concat(e, '">').concat(t.url, "</a></td></tr>");
        $("#medialist").append(E), $("#medialist .dlmDownload").click((function () {
            var t = $(this).parent().parent().next().find("a").attr("href");
            (0, o.sendMessage)(o.EVENTS.DLM_NEW_TASK, {
                url: t
            }), localStorage.removeItem("setDirectlySave")
        })), $("#medialist #blockDomain").off().on("click", (function () {
            var t = $(this).parent().parent().next().find("a"),
                e = t.attr("href"),
                n = t.attr("id").split("-"),
                a = n[1],
                i = n[2],
                c = new URL(e);
            return (0, o.sendMessage)(o.EVENTS.BLOCK_ONE_DOMAIN, {
                oneDomain: c.host,
                tabId: l,
                mediaId: a,
                oneEleIndex: i
            }), $(this).parent().parent().remove(), $("#tempntc").html((0, r.t)("TpopBlockedDomainNotify") + "<br/>" + c.host).fadeIn(500).delay(1500).fadeOut(500), !1
        })), $("#medialist #copy").off().on("click", (function () {
            var t = this;
            (0, o.sendMessage)(o.EVENTS.ISAP, {}).then((function (e) {
                var n = $(t).parent().parent().next().find("a").attr("href"),
                    o = $('<input id="copy_tmp" value="' + n + '" />');
                return $("body").append(o), o.select(), document.execCommand("Copy"), $("#copy_tmp").remove(), $("#tempntc").html((0, r.t)("TtempntcInfoCopied")).fadeIn(500).delay(1500).fadeOut(500), !1
            }))
        })), $("#medialist .vDownload").off().on("click", (function () {
            var t = this;
            if ($(this).siblings("#m3u8").length > 0) a.runtime.sendMessage({
                cmd: "cmd_open_parser"
            });
            else {
                var e = $(this).parent().parent().next().find("a").attr("href");
                if (c) {
                    var n = $(this).parent().parent().next().find("a").attr("download");
                    a.downloads.download({
                        url: e,
                        filename: n
                    })
                } else {
                    localStorage.getItem("setDirectlySave") ? (0, o.sendMessage)(o.EVENTS.ISAP, {}).then((function (n) {
                        if (n) {
                            var r = $(t).parent().parent().next().find("a").attr("download");
                            a.downloads.download({
                                url: e,
                                filename: r
                            })
                        } else(0, o.sendMessage)(o.EVENTS.DLM_NEW_TASK, {
                            url: e
                        })
                    })) : (0, o.sendMessage)(o.EVENTS.DLM_NEW_TASK, {
                        url: e
                    })
                }
            }
            return !1
        })), $("#medialist #play").off().on("click", (function () {
            var t = '<tr id="player"><td colspan="4"><video autoplay controls width="100%"></video><input id="CloseBtn" type="button" value="'.concat((0, r.t)("TCloseBtn"), '" class="button"/></td></tr>'),
                e = $(this).parent().parent().next().find("a").attr("href");
            return $(this).parent().parent().after($(t)), $("video").attr("src", e), $("#CloseBtn").bind("click", (function () {
                return $("video").removeAttr("src"), $("#player").remove(), !1
            })), !1
        })), $("#medialist #m3u8").off().on("click", (function () {
            var t = $(this).parent().parent().next().find("a").attr("href");
            a.tabs.create({
                url: "/m3u8.html?m3u8_url=" + t
            })
        })), (0, o.sendMessage)(o.EVENTS.ISAP, {}).then((function (t) {
            return $(".nameTd").off().on("click", (function (t) {
                var e = $(this).parent().next();
                $(e).toggle()
            })), !0
        })), $("#DownFile").off().on("click", (function () {
            return $("#medialist input").each((function () {
                $(this).prop("checked") && $(this).parent().siblings(".toolsTd").find(".vDownload").click()
            })), !1
        })), $("#AllCopy").off().on("click", (function () {
            return (0, o.sendMessage)(o.EVENTS.ISAP, {}).then((function (t) {
                var e = $('<textarea id="copy_tmp"></textarea>'),
                    n = "";
                $("#medialist input").each((function () {
                    $(this).prop("checked") && (n += $(this).parent().parent().next().find("a").attr("href") + "\n")
                })), $(e).val(n), $("body").append(e), e.select(), document.execCommand("Copy"), $("#copy_tmp").remove(), $("#tempntc").html((0, r.t)("TtempntcInfoCopied")).fadeIn(500).delay(1500).fadeOut(500)
            })), !1
        })), $("#AllSelect").off().on("click", (function () {
            return $("#medialist input").each((function () {
                $(this).attr("checked", "true")
            })), !1
        })), $("#ReSelect").off().on("click", (function () {
            return $("#medialist input").each((function () {
                $(this).prop("checked") ? $(this).attr("checked", !1) : $(this).attr("checked", !0)
            })), !1
        }))
    }(s = u.localStorage.getItem("serverNotice")) && $("#serverNotice").html(s), a.tabs.query({
        active: !0,
        currentWindow: !0
    }, (function (t) {
        var e, n = t[0];
        if (r.DISABLE_DOWNLOADING_FROM_YOUTUBE_REGEXP.exec(n.url))(0, o.sendMessage)(o.EVENTS.ISAP, {}).then((function (t) {
            if (t) $("#mainPanel").html('<div class="column is-full has-text-centered">\n                <p class="is-size-7">'.concat((0, r.t)("TpopYTDLdesc"), '</p>\n                <a id="tryHls" class="button is-link is-outlined"\n                  title="').concat((0, r.t)("TpopYTDLdlIt"), '" href="').concat(r.YTDLPAGE, "?url=").concat(encodeURIComponent(n.url), '" target="_blank"><span\n                    class="icon">\n                    <i class="fa fa-play"></i>\n                  </span><span>').concat((0, r.t)("TpopYTDLdlIt"), "</span></a>\n              </div>"));
            else {
                var e = r.HOMEPAGE + "/" + (r.supportedLanguages.includes(i) ? i + "/" : "") + "failed.html";
                $("#tempntc").html('<a href="' + e + '" target="_blank">' + (0, r.t)("TpopNotSupport") + (0, r.t)("TpopNotSuppWhy") + "</a>"), $("#tempntc").show(), $("#mainPanel").hide()
            }
        }));
        else {
            $("#tempntc").css("min-height", "20px"), $("#mainPanel").show(), l = n.id;
            var c = "tabid" + n.id;
            if (function (t) {
                    if (null == t || 0 == t.length) return void $("#tempntc").fadeIn(500);
                    for (var e = 0; e < t.length; e++) p(t[e], e);
                    f()
                }(u.mediaurls[c]), a.runtime.onMessage.addListener((function (t) {
                    t.tabid == l && ($("#tempntc").hide(), p(t), f())
                })), e = c, (u.mediaurls[e] ? u.mediaurls[e].length : 0) >= Number(u.localStorage.popListCount)) $('<div class="has-text-centered"><p class="has-text-danger">' + (0, r.t)("TpopTooManyFiles") + '<a href="#" id="goOptionPage">' + (0, r.t)("TcustomSetting") + "</a></p></div>").insertAfter("#medialist"), $("#goOptionPage").click((function () {
                a.runtime.openOptionsPage()
            }))
        }
    }))
}, function (t, e, n) {}]);